<?php
/**
 * Unfuddle Message Category Model
 * Message categories are represented by this model
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Category.php 29 2011-05-09 07:08:53Z luke.visinoni $
 */
class Unfuddle_Model_Category extends Unfuddle_Model_Abstract {

    /**
     * Returns collection of message categories for given project
     */
    const URI_CATEGORIES = '/projects/%d/categories';
    
    /**
     * Access a category by project id and category id
     */
    const URI_CATEGORY_BY_ID = '/projects/%d/categories/%d';
    
    /**
     * @var string Model name
     */
    protected $_name = 'category';
    
    /**
     * @var array Model fields
     */
    protected $_fields = array(
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'name' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'project-id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
    );

}
